import type { ExtensibleEntityDto, ExtensibleObject } from '@abp/ng.core';
import type { DocumentStatus } from '../core/document-status.enum';
import type { OperatorDto } from '../staff/models';
import type { AuxiliaryUnitDto, ItemMasterDto } from '../item-masters/models';
import type { CustomerDto } from '../customers/models';

export interface IntentOrderCreateDto extends IntentOrderCreateOrUpdateBase {
  children: IntentOrderLineCreateOrUpdateDto[];
}

export interface IntentOrderCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  customer?: string;
  operatorId?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface IntentOrderDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: IntentOrderTypeDto;
  customer?: string;
  operatorId?: string;
  operator: OperatorDto;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface IntentOrderDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: IntentOrderTypeDto;
  customer?: string;
  operatorId?: string;
  operator: OperatorDto;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: IntentOrderLineDto[];
  concurrencyStamp?: string;
}

export interface IntentOrderLineCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  unitId?: string;
  unitPrice: number;
  deliveryDate?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface IntentOrderLineDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: IntentOrderDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  unitPrice: number;
  deliveryDate?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface IntentOrderTypeCreateDto extends IntentOrderTypeCreateOrUpdateBase {
}

export interface IntentOrderTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface IntentOrderTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface IntentOrderTypeUpdateDto extends IntentOrderTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface IntentOrderUpdateDto extends IntentOrderCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: IntentOrderLineCreateOrUpdateDto[];
}

export interface SaleOrderCreateDto extends SaleOrderCreateOrUpdateBase {
  children: SaleOrderLineCreateOrUpdateDto[];
}

export interface SaleOrderCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  orderTypeId?: string;
  customerId?: string;
  operatorId?: string;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface SaleOrderDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderType: SaleOrderTypeDto;
  customerId?: string;
  customer: CustomerDto;
  operatorId?: string;
  operator: OperatorDto;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface SaleOrderDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  orderTypeId?: string;
  orderType: SaleOrderTypeDto;
  customerId?: string;
  customer: CustomerDto;
  operatorId?: string;
  operator: OperatorDto;
  mark?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: SaleOrderLineDto[];
  concurrencyStamp?: string;
}

export interface SaleOrderLineCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  unitId?: string;
  unitPrice: number;
  deliveryDate?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface SaleOrderLineDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: SaleOrderDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  quantity: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  unitPrice: number;
  deliveryDate?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface SaleOrderTypeCreateDto extends SaleOrderTypeCreateOrUpdateBase {
}

export interface SaleOrderTypeCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface SaleOrderTypeDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface SaleOrderTypeUpdateDto extends SaleOrderTypeCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface SaleOrderUpdateDto extends SaleOrderCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: SaleOrderLineCreateOrUpdateDto[];
}
